﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CCF20Model;
using WiseLink.RDS.Resource;
namespace CCF20Model.FaultHandler
{
    public class GiveUpCustomerFaultHandler2 : FaultHandlerBase
    {
        public GiveUpCustomerFaultHandler2(IFaultHandler faultHandler)
        {
            this.PreviousHandler = faultHandler;
            this.MyVehicle = faultHandler.MyVehicle;
            this.MyFault = faultHandler.MyFault;
            this.ccf20Ent = faultHandler.ccf20Ent;
        }
        public override void ProcessRequest()
        {
            IFaultHandler nextHandler;
            if (MyFault.FaultType.Contains(WiseLinkRDSStatus.Fault_Type_Urgent))
            {
                LoggerHelper.LogZICDebug("[放弃客户]-撞车请求--显示撞车请求");
                nextHandler = new ProcessUrgentHandler2(this);
                
            }
            else
            {
                CloseFault(MyVehicle.LastContactResult);
                LoggerHelper.LogZICDebug(string.Format("[放弃客户]屏蔽所有非撞车请求 当前请求为{0}",MyFault.FaultType));
                nextHandler = new CompleteFaultHandler(this);
                
            }
            nextHandler.ProcessRequest();
        }
    }
  
}
